package com.gao.controller;

import com.gao.entity.User;
import com.gao.service.IUserService;
import com.gao.util.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author gao
 * @time 2022/01/23 15:02:30
 */
@RestController
public class UserController {

    @Autowired
    private IUserService userService;

    @PostMapping("user/save")
    public ResultVO save(@RequestBody User user) {
        userService.save(user);
        return ResultVO.success("添加成功");
    }

}
